{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# IO 流"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "获取键盘输入，并打印到屏幕。\n",
    "\n",
    "因为 `ipynb` 文件被 Sphinx 编译时无法直接获取到键盘输入，所以，这里先把 `input()` 函数注释掉了。\n",
    "\n",
    "当我们使用这段代码时，应当解开注释。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# str_1 = input(\"Enter a string: \")\n",
    "# str_2 = input(\"Enter another string: \")\n",
    "\n",
    "# print(\"str_1 is: \" + str_1 + \". str_2 is: \" + str_2) # 普通输出\n",
    "# print(\"str_1 is: {}. str_2 is: {}\".format(str_1, str_2)) # 格式控制"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
